package ${pageSet.codePackage}.suport;

import org.apache.commons.lang.StringUtils;
import org.hibernate.Criteria;
import org.hibernate.Query;
import org.hibernate.criterion.Restrictions;

import com.ienergy.base.support.QueryParameter;
import com.ienergy.base.support.QueryParameterProcessor;

/**
* ${pageSet.pageCNName} 页面查询处理过程
* @author ${pageSet.author?cap_first}
* @date ${pageSet.sysTime?string("yyyy-MM-dd")}
*/
public class ${xmlBean.codeMark?cap_first}Processor implements QueryParameterProcessor {

	public void process(Criteria criteria, QueryParameter parameter) {
		
		//提取查询参数
		${xmlBean.codeMark?cap_first}Param param = (${xmlBean.codeMark?cap_first}Param) parameter;

		if (StringUtils.isNotEmpty(param.get${xmlBean.pmKey?cap_first}())){
			criteria.add(Restrictions.like("${xmlBean.pmKey}", param.get${xmlBean.pmKey?cap_first}()+"%"));
		}

		
	}

	public void process(Query query, QueryParameter parameter) {
		// TODO Auto-generated method stub

	}

}
